home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / prolog_2.zip / PUZZLES.ZIP / ARROW.PRO < prev    next >
Text File  |  1987-04-05  |  256b  |  9 lines

  1. /* This shows how to define the "->" operator, which is 
  2. introduced in the Clocksin and Mellish second edition. */
  3.  
  4. ?-op( 254, xfy, '->' ).
  5.  
  6. (X -> Y; Z) :- X, !, Y.
  7. (X -> Y; Z) :- Z.
  8.  
  9.